
public class Date {
    public int year;
    public int month;
    public int day;

  public void setDate(int year,int month,int day){
      this.year =  year;
      this.month = month;
      this.day = day;
  }
    public void printDate(){
        System.out.println(this.year+" "+this.month+" "+this.day);
    }


    public static void main(String[] args) {
        Date date = new Date();
        Date date2 = new Date();

        date.setDate(2022,8,4);
        date2.setDate(2022,8,5);

        date.printDate();
        date2.printDate();
    }
}

